#!/bin/bash

#build app docker images
# cd /www/jenkinsRemote/deploy/jnpf-permission/
# cp -r /www/jenkinsRemote/jnpf-permission/jnpf-permission-server/target/jnpf-permission-3.4.7-RELEASE.jar .
# rm -rf target
docker rmi BYMBlog:v1.0.0
docker build -t BYMBlog:v1.0.0 .

#app container restart
docker stop BYMBlog
docker rm BYMBlog

#PROD配置环境nacos配置，不要动
docker run -e APPENV="prod" -m 1024m -d --restart=always --name jnpf-permission --network=host -p 8971:8971 -v /root/baiyimi/datas/bymblog:/baiyimi/blog BYMBlog:v1.0.0